home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
tools
/
czesc_3
/
phoonsrc
/
amiga.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-02-23
|
2KB
|
68 lines
/*
* amiga.h
*
* Author: Tomi Ollila <too@cs.hut.fi>
*
* Created: Sun Jul 05 15:03:40 1992 too
* Last modified: Thu Feb 24 11:57:48 1994 too
*
*/
#ifndef _AMIGA_H_
#define _AMIGA_H_
#include <exec/types.h>
#include <dos/rdargs.h>
BOOL am_OpenLibraries(void);
int am_CloseLibraries(int);
BOOL am_GetScreenSize(int *, int *);
char * am_LoadFullmoon(int *, int *, char *);
void am_MakeIFFile(int, int, char *, int);
void Printf(const char * fmt, ...);
/*
* ReadArgs stuff (etc)
*/
#define TEMPLATE \
"-f=FILE,-g=POSITION/K,-d=DOUBLE/S,-s=SHADE/S,-r=REVERSE/S,-h=GMTOFFSET/N"
enum { CI_FILE, CI_POSITION,
CI_DOUBLE, CI_SHADE, CI_REVERSE, CI_GMTOFFSET, CI_SIZE };
extern struct RDArgs * rdargs;
extern LONG args[];
/*** other extern variables ***/
extern const char usage[];
extern WORD gmtoffset;
/*
* Memory for bitmaps is longword aligned so we can use longword copy.
*/
#define BitmapSize(w,h) (((((w) + 31) / 32) * 4) * (h))
static __inline void
FreeVec (APTR memoryBlock)
{
extern struct ExecBase * SysBase;
register struct ExecBase *a6 __asm("a6") = SysBase;
register APTR a1 __asm("a1") = memoryBlock;
__asm __volatile ("jsr a6@(-0x2b2)"
: /* no output */
: "r" (a6), "r" (a1)
: "a0","a1","d0","d1", "memory");
}
#define BP(fmt, args...) \
do { \
Printf("** " __FILE__ ":%ld: " fmt, __LINE__, ## args); \
{ \
register struct ExecBase *a6 __asm("a6") = SysBase; \
register unsigned long d0 __asm("d0") = (1<<14); \
__asm __volatile ("jsr a6@(-0x13e)" \
: /* no output */ \
: "r" (a6), "r" (d0) \
: "a0","a1","d0","d1", "memory"); \
} \
} while (0)
#endif /* _AMIGA_H_ */